home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / dev / lang / Python16_Src.lha / Python16_Source / Python / importdl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-08-03  |  932 b   |  51 lines

  1. #ifndef Py_IMPORTDL_H
  2. #define Py_IMPORTDL_H
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. /* Definitions for dynamic loading of extension modules */
  9. enum filetype {
  10.     SEARCH_ERROR,
  11.     PY_SOURCE,
  12.     PY_COMPILED,
  13.     C_EXTENSION,
  14.     PY_RESOURCE, /* Mac only */
  15.     PKG_DIRECTORY,
  16.     C_BUILTIN,
  17.     PY_FROZEN,
  18.     PY_CODERESOURCE /* Mac only */
  19. };
  20.  
  21. struct filedescr {
  22.     char *suffix;
  23.     char *mode;
  24.     enum filetype type;
  25. };
  26. extern struct filedescr * _PyImport_Filetab;
  27. extern const struct filedescr _PyImport_DynLoadFiletab[];
  28.  
  29. extern PyObject *_PyImport_LoadDynamicModule
  30.     Py_PROTO((char *name, char *pathname, FILE *));
  31.  
  32. /* Max length of module suffix searched for -- accommodates "module.slb" */
  33. #define MAXSUFFIXSIZE 12
  34.  
  35. #ifdef MS_WINDOWS
  36. #include <windows.h>
  37. typedef FARPROC dl_funcptr;
  38. #else
  39. #ifdef PYOS_OS2
  40. typedef int (* APIENTRY dl_funcptr)();
  41. #else
  42. typedef void (*dl_funcptr)(void);
  43. #endif
  44. #endif
  45.  
  46.  
  47. #ifdef __cplusplus
  48. }
  49. #endif
  50. #endif /* !Py_IMPORTDL_H */
  51.